<div data-ng-controller="contractBaseCtrl">
    <div class="table-header clearfix ng-scope">
        <span class="fl lh30 f14">{{contractBaseInfo.contract_code_readonly}}</span>
    </div>

    <form name="contractBaseForm" class="form-horizontal" novalidate>
	    <div class="form-group mt10" ng-if="contractBaseInfo.contractTypeName != null">
		    <span for="inputtext3" class="col-sm-3 control-label">业务类型</span>
		    <div class="col-sm-5">
			    <input type="text" ng-model="contractBaseInfo.contractTypeName" class="form-control" id="inputtext3"
			           ng-disabled="true" placeholder="业务类型">
		    </div>

		    <div class="col-sm-23 relative pb10 ml25 pull-right mr10">
			    <div class="border-bottom-dashed pl10 relative"></div>
		    </div>
		</div>

	    <div ng-if="contractBaseInfo.contractTypeName == null || contractBaseInfo.contractType == 1 || contractBaseInfo.contractType == 2 || contractBaseInfo.contractType == 4">
		    <div class="section-title c-orange ml10 mt10"><em class="digit-circle">1</em><span class="ml10">客户信息</span>
		    </div>

		    <div class="form-group mt10 hide">
			    <span class="col-sm-3 control-label">客户性质</span>

			    <div class="col-sm-5">
				    <div class="radio fl" style="margin-right:50px">
					    <input type="radio" ng-model="contractBaseInfo.customer_property" required value="0" id="rbt_dev"
					           name="customer_property" checked="checked">
					    <label for="rbt_dev">开发商</label>
				    </div>
				    <div class="radio fl">
					    <input type="radio" ng-model="contractBaseInfo.customer_property" required value="1" id="rbt_agent"
					           name="customer_property">
					    <label for="rbt_agent">代理商</label>
				    </div>
                <span role="alert" style="clear:both;"
                      ng-show="(contractBaseForm.$submitted || contractBaseForm.customer_property.$touched) && contractBaseForm.customer_property.$error.required"
                      class="clearfix error ng-hide c-red lh30">请选择客户性质</span>
			    </div>
		    </div>

			<div class="form-group mt10" ng-if="contractBaseInfo.contractType == 4">
				<span for="inputtext3" class="col-sm-3 control-label">供应商名称</span>

				<div class="col-sm-5" style="width: 25%;">
					<span>
				    <input name="supplier_name" type="text" ng-model="contractBaseInfo.supplier_name" class="form-control" style="display:inline;width: 82%;"
						   placeholder="供应商名称" data-ng-disabled="true">
					</span>
					<span>
					<a id='searchSupplierInfo' href="javascript:;" ng-if="[3,4].indexOf(contractBaseInfo.contractType)>=0"
					   ui-dialog="选择供应商"
					   ui-dialog-data="{}"
					   ui-dialog-show="selectSupplierService.onShowSupplier($dialog,$dialogScope,contractBaseInfo.supplier_id)"
					   ui-dialog-ok="selectSupplierService.onChooseSupplier(contractBaseInfo,$dialog,$dialogScope)"
					   ui-dialog-cache="false"
					   ui-dialog-url="/contract/dialog/select-supplier.html"
					>选择
					</a>
					</span>
				</div>
				<span role="alert"
					  ng-show="(contractBaseForm.$submitted || contractBaseForm.sign_date.$touched) && contractBaseForm.supplier_name.$error.required"
					  class="error ng-hide c-red lh30">供应商名称不能为空</span>
			</div>

		    <div class="form-group mt10">
			    <span for="inputtext3" class="col-sm-3 control-label">客户简称</span>

			    <div class="col-sm-5">
				    <input id="idCustomerName" name="customer_id" select2 required ng-model="contractBaseInfo.customer_id"
				           select2-model="ddl2Customer"
				           config="ddlConfigCustomer" class="form-control" type="text"/>
                <span role="alert"
                      ng-show="(contractBaseForm.$submitted || contractBaseForm.customer_id.$touched) && contractBaseForm.customer_id.$error.required"
                      class="error ng-hide c-red lh30">客户简称不能为空</span>
			    </div>
			    <span for="inputtext3" class="col-sm-3 control-label">顶级客户简称</span>

			    <div class="col-sm-5">
				    <input type="text" ng-model="contractBaseInfo.top_customer_name" class="form-control" id="inputtext3"
				           ng-disabled="true" placeholder="顶级客户简称">
			    </div>
			    <span for="inputtext3" class="col-sm-3 control-label">签约客户全称</span>

			    <div class="col-sm-5">
				    <input type="text" ng-model="contractBaseInfo.customer_full_name" class="form-control" id="inputtext3"
				           ng-disabled="true" placeholder="签约客户简称">
			    </div>
		    </div>
			<div class="form-group mt10">
				<span for="inputtext3" class="col-sm-3 control-label">客户类别</span>

				<div class="col-sm-5">
					<input ng-if="contractBaseInfo.customer_property == 0" type="text" value="开发商" class="form-control" id="inputtext3"
						   ng-disabled="true" placeholder="客户类别">
					<input ng-if="contractBaseInfo.customer_property == 1" type="text" value="供应商" class="form-control" id="inputtext3"
						   ng-disabled="true" placeholder="客户类别">
				</div>

				<div class="col-sm-23 relative pb10 ml25 pull-right mr10">
					<div class="border-bottom-dashed pl10 relative"></div>
				</div>
			</div>
	    </div>

	    <div ng-if="contractBaseInfo.contractType == 3 || contractBaseInfo.contractType == 5">
		    <div class="section-title c-orange ml10 mt10"><span class="ml10">供应商信息</span>
		    </div>

		    <div class="form-group mt10">
			    <span for="inputtext3" class="col-sm-3 control-label">供应商名称</span>

			    <div class="col-sm-5" style="width: 25%;">
					<span>
				    <input name="supplier_name" type="text" ng-model="contractBaseInfo.supplier_name" class="form-control" style="display:inline;width: 82%;"
				           placeholder="供应商名称" data-ng-disabled="true">
					</span>
					<span>
					<a id='searchSupplierInfo' href="javascript:;" ng-if="[3,4].indexOf(contractBaseInfo.contractType)>=0"
					   ui-dialog="选择供应商"
					   ui-dialog-data="{}"
					   ui-dialog-show="selectSupplierService.onShowSupplier($dialog,$dialogScope,contractBaseInfo.supplier_id)"
					   ui-dialog-ok="selectSupplierService.onChooseSupplier(contractBaseInfo,$dialog,$dialogScope)"
					   ui-dialog-cache="false"
					   ui-dialog-url="/contract/dialog/select-supplier.html"
					>选择
					</a>
					</span>
			    </div>
			    <span role="alert"
			          ng-show="(contractBaseForm.$submitted || contractBaseForm.sign_date.$touched) && contractBaseForm.supplier_name.$error.required"
			          class="error ng-hide c-red lh30">供应商名称不能为空</span>
		    </div>

			<div ng-if="contractBaseInfo.contractType == 5">
				<div class="section-title c-orange ml10 mt10"><span class="ml10">开发商信息</span>
				</div>

				<div class="form-group mt10">
					<span for="inputtext3" class="col-sm-3 control-label">客户简称</span>
					<div class="col-sm-5">
						<input type="text" ng-model="linkcontract.customer_name" class="form-control" id="inputtext3"
						       placeholder="客户简称">
					</div>

					<span for="inputtext3" class="col-sm-3 control-label">顶级客户简称</span>
					<div class="col-sm-5">
						<input type="text" ng-model="linkcontract.top_customer_name" class="form-control" id="inputtext3"
						       placeholder="顶级客户简称">
					</div>

					<span for="inputtext3" class="col-sm-3 control-label">签约客户全称</span>

					<div class="col-sm-5">
						<input type="text" ng-model="linkcontract.customer_full_name" class="form-control" id="inputtext3"
						       placeholder="签约客户全称">
					</div>
				</div>

				<div class="form-group mt10">
					<span for="inputtext3" class="col-sm-3 control-label">企业名称</span>
					<div class="col-sm-5">
						<input type="text" ng-model="linkcontractrelation.tenant_name" class="form-control" id="inputtext3"
							   placeholder="企业名称">
					</div>

					<span for="inputtext3" class="col-sm-3 control-label">企业代码</span>
					<div class="col-sm-5">
						<input type="text" ng-model="linkcontractrelation.tenant_code" class="form-control" id="inputtext3"
						       placeholder="企业代码">
					</div>

					<span for="inputtext3" class="col-sm-3 control-label">帐号开通日期</span>
					<div class="col-sm-5">
						<input type="text" ng-model="linkcontractrelation.kt_date" class="form-control" id="inputtext3"
						       placeholder="帐号开通日期">
					</div>
				</div>

				<div class="form-group mt10">
					<span for="inputtext3" class="col-sm-3 control-label">对应合同</span>
					<div class="col-sm-5">
						<a target="_blank" class="form-control" href="edit.shtml#/base?id={{linkcontract.contract_id}}">{{linkcontract.contract_code}}</a>
					</div>
				</div>
			</div>

		    <div class="col-sm-23 relative pb10 ml25 pull-right mr10">
			    <div class="border-bottom-dashed pl10 relative"></div>
		    </div>
	    </div>



        <!-- 合同信息 -->
        <div class="section-title c-orange ml10 mt10"><span class="ml10">合同信息</span>
        </div>
        <div class="form-group mt10">
            <span for="inputtext3" class="col-sm-3 control-label">合同性质</span>

            <div class="col-sm-5">
                <input select2 required name="contract_property_id" ng-model="contractBaseInfo.contract_property_id"
                       select2-model="ddl2Nature"
                       config="ddlConfigContractNature" class="form-control" type="text"/>
                <span role="alert"
                      ng-show="(contractBaseForm.$submitted || contractBaseForm.contract_property_id.$touched) && contractBaseForm.contract_property_id.$error.required"
                      class="error ng-hide c-red lh30">请选择合同性质</span>
            </div>
            <span for="inputtext3" class="col-sm-3 control-label">合同签署公司</span>

            <div class="col-sm-5">
                <input id="idCompanyId" select2 required name="company_id" ng-model="contractBaseInfo.company_id"
                       select2-model="ddl2Company" config="ddlConfigCompany"
                       class="form-control" type="text"/>
                <span role="alert"
                      ng-show="(contractBaseForm.$submitted || contractBaseForm.company_id.$touched) && contractBaseForm.company_id.$error.required"
                      class="error ng-hide c-red lh30">请选择合同签署公司</span>
            </div>
            <span for="inputtext3" class="col-sm-3 control-label">合同编号</span>

            <div class="col-sm-5">
                <input type="text" maxlength="200" name="contract_code"
                       ng-model="contractBaseInfo.contract_code" class="form-control" id="inputtext3"
                       ng-disabled="true" placeholder="合同编号">
            </div>
        </div>
		<div class="form-group mt10">
			<span for="inputtext3" class="col-sm-3 control-label">合同来源(财务)</span>
			<div class="col-sm-5">
				<input type="text" maxlength="200" name="soure_financial"
					   ng-model="contractBaseInfo.soure_financial" class="form-control" id="inputtext3"
					   ng-disabled="true" placeholder="合同来源财务">
			</div>

			<span for="inputtext3" class="col-sm-3 control-label">合同来源(业财)</span>
			<div class="col-sm-5">
				<input type="text" maxlength="200" name="soure_business"
					   ng-model="contractBaseInfo.soure_business" class="form-control" id="inputtext3"
					   ng-disabled="true" placeholder="合同来源业财">
			</div>
		</div>
        <div class="form-group mt10" ng-if="contractBaseInfo.contractTypeName == null">
            <span for="inputtext3" class="col-sm-3 control-label">合同类别</span>

            <div class="col-sm-5">
                <input select2 name="category_id" id="category_id" ng-model="contractBaseInfo.category_id"
                       select2-model="ddl2Category"
                       config="ddlConfigContractCategory" class="form-control" type="text"/>
                <span role="alert"
                      ng-show="(contractBaseForm.$submitted || contractBaseForm.category_id.$touched) && contractBaseForm.category_id.$error.required"
                      class="error ng-hide c-red lh30">请选择合同类别</span>
            </div>
            <span for="inputtext3" class="col-sm-3 control-label">合同大类</span>

            <div class="col-sm-5">
                <input select2 name="big_category_id" id="big_category_id"
                       ng-model="contractBaseInfo.big_category_id" select2-model="ddl2BigClass"
                       config="ddlConfigContractBigClass" class="form-control" type="text"/>
                <span role="alert"
                      ng-show="(contractBaseForm.$submitted || contractBaseForm.big_category_id.$touched) && contractBaseForm.big_category_id.$error.required"
                      class="error ng-hide c-red lh30">请选择合同大类</span>
            </div>
            <span for="inputtext3" class="col-sm-3 control-label">收入项</span>

            <div class="col-sm-5">
                <input id="idSmallClass" select2 name="littler_category_id"
                       ng-model="contractBaseInfo.littler_category_id" select2-model="ddl2SmallClass"
                       config="ddlConfigContractSmallClass" class="form-control" type="text"/>
                <span role="alert"
                      ng-show="(contractBaseForm.$submitted || contractBaseForm.littler_category_id.$touched) && contractBaseForm.littler_category_id.$error.required"
                      class="error ng-hide c-red lh30">收入项不能为空</span>
            </div>
        </div>
        <div class="form-group mt10">
            <span for="inputtext3" class="col-sm-3 control-label">合同签署日期</span>

            <div class="col-sm-5">
                <input type="text" class="input-date fl form-control" style="width:100%"
                       ui-date format="yyyy-MM-dd" required name="sign_date" ng-model="contractBaseInfo.sign_date"
                       placeholder="合同签署日期"
                        >
                <span role="alert"
                      ng-show="(contractBaseForm.$submitted || contractBaseForm.sign_date.$touched) && contractBaseForm.sign_date.$error.required"
                      class="error ng-hide c-red lh30">合同签署日期不能为空</span>
            </div>

			<div ng-if="contractBaseInfo.contractType != 6">
				<span for="inputtext3" class="col-sm-3 control-label">合同录入日期</span>

				<div class="col-sm-5">
					<input type="text" class="input-date fl form-control" style="width:100%"
						   ui-date format="yyyy-MM-dd" ng-model="contractBaseInfo.input_date" placeholder="保存后自动生成"
						   ng-disabled="true">
				</div>
			</div>

	        <!-- todo -->
            <span for="inputtext3" class="col-sm-3 control-label">合同生效日期</span>
	        <div class="col-sm-5">
		        <input type="text" class="input-date fl form-control" style="width:100%"
		               ui-date format="yyyy-MM-dd" ng-model="contractBaseInfo.effect_date" placeholder="合同生效日期">
	        </div>

			<!--<div ng-if="contractBaseInfo.contractType == 6">-->
				<!--<span for="inputtext3" class="col-sm-3 control-label">产品类型</span>-->

				<!--<div class="col-sm-5">-->
					<!--<input type="text" class="input-date fl form-control" value="会员费" placeholder="保存后自动生成"-->
						   <!--ng-disabled="true">-->
				<!--</div>-->
			<!--</div>-->

        </div>

		<div class="form-group mt10" ng-if="contractBaseInfo.contractType == 6">
			<span for="inputtext3" class="col-sm-3 control-label">期初采宝余额</span>

			<div class="col-sm-5">
				<input type="number" number required min="0" ng-model="contractBaseInfo.begin_remain_amount"
					   class="form-control align-r" id="inputtext3" disabled="true" placeholder="期初采宝余额">
			</div>

			<span for="inputtext3" class="col-sm-3 control-label">本月充值总额</span>

			<div class="col-sm-5">
				<input type="number" number required min="0" ng-model="contractBaseInfo.this_month_recharge_amount"
					   class="form-control align-r" id="inputtext3" disabled="true placeholder="本月充值总额">
			</div>

			<span for="inputtext3" class="col-sm-3 control-label">本月消耗总额</span>

			<div class="col-sm-5">
				<input type="number" number required min="0" ng-model="contractBaseInfo.this_month_consume_amount"
					   class="form-control align-r" id="inputtext3" disabled="true placeholder="本月消耗总额">
			</div>
		</div>

		<div class="form-group mt10" ng-if="contractBaseInfo.contractType == 6">
			<span for="inputtext3" class="col-sm-3 control-label">期末采宝余额</span>

			<div class="col-sm-5">
				<input type="number" number required min="0" ng-model="contractBaseInfo.end_remain_amount"
					   class="form-control align-r" id="inputtext3" disabled="true placeholder="期末采宝余额">
			</div>

			<span for="inputtext3" class="col-sm-3 control-label">已开票金额</span>

			<div class="col-sm-5">
				<input type="number" number required min="0" ng-model="contractBaseInfo.balance_amount"
					   class="form-control align-r" id="inputtext3" disabled="true placeholder="已开票金额">
			</div>

			<span for="inputtext3" class="col-sm-3 control-label">已回款金额</span>

			<div class="col-sm-5">
				<input type="number" number required min="0" ng-model="contractBaseInfo.back_amount"
					   class="form-control align-r" id="inputtext3" disabled="true placeholder="已回款金额">
			</div>
		</div>

	    <div class="form-group mt10">
		    <div ng-if="contractBaseInfo.contractType == 1 || contractBaseInfo.contractType == 2
		        || contractBaseInfo.contractType == 3 || contractBaseInfo.contractType == 4
		        || contractBaseInfo.contractType == 7">

			    <span for="inputtext3" class="col-sm-3 control-label">录入人</span>

			    <div class="col-sm-5">
				    <input type="text" class="input-date fl form-control" style="width:100%"
				           ng-model="contractBaseInfo.created_by" placeholder="录入人"
				           ng-disabled="true">
			    </div>
		    </div>

		    <div ng-if="contractBaseInfo.contractType == 5">

			    <span for="inputtext3" class="col-sm-3 control-label">订单编号</span>

			    <div class="col-sm-5">
				    <input type="text" class="input-date fl form-control" style="width:100%"
				           ng-model="contractBaseInfo.orderid" placeholder="订单编号"
				           ng-disabled="true">
			    </div>
		    </div>

		    <div class="col-sm-23 relative pb10 ml25 pull-right mr10">
			    <div class="border-bottom-dashed pl10 relative"></div>
		    </div>
	    </div>

		<div class="form-group mt10" ng-if="contractBaseInfo.contractType == 7">
			<span for="inputtext3" class="col-sm-3 control-label">合同所属区域</span>

			<div class="col-sm-5">
				<input id="idAreaid" select2 required name="area_id" ng-model="contractBaseInfo.area_id"
					   select2-model="ddl2Areaid"
					   config="ddlConfigContractAreaid" class="form-control" type="text" placeholder="合同所属区域"/>
			</div>
		</div>

        <div class="form-group mt10" ng-if="[5,6].indexOf(contractBaseInfo.contractType) == -1">
            <span for="inputtext3" class="col-sm-3 control-label">合同签约人</span>

            <div class="col-sm-5"  ng-if="contractBaseInfo.contractType != 4">
                <input id="idSigner" select2 required name="sign_people_id" ng-model="contractBaseInfo.sign_people_id"
                       select2-model="ddl2Signer"
                       config="ddlConfigContractSigner" class="form-control" type="text" placeholder="合同签约人"/>
                <span role="alert"
                      ng-show="(contractBaseForm.$submitted || contractBaseForm.sign_people_id.$touched) && contractBaseForm.sign_people_id.$error.required"
                      class="error ng-hide c-red lh30">请选择合同签约人</span>
            </div>

			<div class="col-sm-5" ng-if="contractBaseInfo.contractType == 4">
				<input id="idSigner" select2 name="sign_people_id" ng-model="contractBaseInfo.sign_people_id"
					   select2-model="ddl2Signer"
					   config="ddlConfigContractSigner" class="form-control" type="text" placeholder="合同签约人"/>
			</div>


            <span for="inputtext3" class="col-sm-3 control-label">合同所属区域</span>

            <div class="col-sm-5">
                <input type="text" name="area_name" ng-model="contractBaseInfo.area_name" class="form-control"
                       id="inputtext3" ng-disabled="true" placeholder="合同所属区域">
            </div>

            <span for="inputtext3" class="col-sm-3 control-label">签约人所属部门</span>

            <div class="col-sm-5">
                <input type="text" ng-model="contractBaseInfo.sign_people_department_name" class="form-control"
                       id="inputtext3" ng-disabled="true"
                       placeholder="签约人所属部门">
            </div>
        </div>

		<div class="form-group mt10" ng-if="contractBaseInfo.contractType == 5">
			<span for="inputtext3" class="col-sm-3 control-label">合同签约人</span>

			<div class="col-sm-5">
				<input id="idSigner2" select2 required name="sign_people_id" ng-model="linkcontract.sign_people_id"
					   select2-model="ddl2Signer"
					   config="ddlConfigContractSigner" class="form-control" type="text" placeholder="合同签约人"/>
			</div>
			<span for="inputtext3" class="col-sm-3 control-label">合同所属区域</span>

			<div class="col-sm-5">
				<input type="text" name="area_name" ng-model="linkcontractother.area_name" class="form-control"
					   id="inputtext3" ng-disabled="true" placeholder="合同所属区域">
			</div>

			<span for="inputtext3" class="col-sm-3 control-label">签约人所属部门</span>

			<div class="col-sm-5">
				<input type="text" ng-model="linkcontractother.sign_people_department_name" class="form-control"
					   id="inputtext3" ng-disabled="true"
					   placeholder="签约人所属部门">
			</div>
		</div>

	    <div class="form-group mt10" ng-if="contractBaseInfo.contractType == 7">
		    <span for="inputtext3" class="col-sm-3 control-label">活动名称</span>
		    <div class="col-sm-5">
			    <input type="text" name="activity_name" ng-model="contractBaseInfo.activity_name" class="form-control"
			           id="inputtext3" placeholder="活动名称">
		    </div>

		    <span for="inputtext3" class="col-sm-3 control-label">活动ID</span>
		    <div class="col-sm-5">
			    <input type="text" name="activity_id" ng-model="contractBaseInfo.activity_id" class="form-control"
			           id="inputtext3" placeholder="活动ID">
		    </div>

		    <span for="inputtext3" class="col-sm-3 control-label">活动举办地</span>
		    <div class="col-sm-5">
			    <input type="text" name="activity_location" ng-model="contractBaseInfo.activity_location" class="form-control"
			           id="inputtext3" placeholder="活动举办地">
		    </div>
	    </div>

        <div class="form-group mt10">
			<div ng-if="contractBaseInfo.contractType == 5">
				<span for="inputtext3" class="col-sm-3 control-label">签约金额</span>

				<div class="col-sm-5">
					<input type="number" name="sign_amount" number required min="0" ng-model="linkcontract.sign_amount"
						   class="form-control align-r" id="inputtext3" placeholder="签约金额">
				</div>
			</div>

			<div ng-if="contractBaseInfo.contractType != 5 && contractBaseInfo.contractType != 6">
				<span for="inputtext3" class="col-sm-3 control-label">签约金额</span>

				<div class="col-sm-5">
					<input type="number" name="sign_amount" number required min="0" ng-model="contractBaseInfo.sign_amount"
						   class="form-control align-r" id="inputtext3" placeholder="签约金额">
					<span role="alert"
						  ng-show="(contractBaseForm.$submitted || contractBaseForm.sign_amount.$touched) && contractBaseForm.sign_amount.$error.required"
						  class="error ng-hide c-red lh30">签约金额不能为空</span>
					<span role="alert"
						  ng-show="(contractBaseForm.$submitted || contractBaseForm.sign_amount.$touched) && contractBaseForm.sign_amount.$error.number"
						  class="error ng-hide c-red lh30">签约金额必须是数值类型</span>
					<span role="alert"
						  ng-show="(contractBaseForm.$submitted || contractBaseForm.sign_amount.$touched) && contractBaseForm.sign_amount.$error.min"
						  class="error ng-hide c-red lh30">签约金额必须大于等于0</span>
				</div>
			</div>

	        <div ng-if="contractBaseInfo.contractType == 1">
		        <span for="inputtext3" class="col-sm-3 control-label">产品租用金额</span>

		        <div class="col-sm-5">
			        <input type="number" number required min="0" name="rent_amount" ng-model="contractBaseInfo.rent_amount"
			               class="form-control align-r" id="inputtext3" placeholder="产品租用金额">
                <span role="alert"
                      ng-show="(contractBaseForm.$submitted || contractBaseForm.rent_amount.$touched) && contractBaseForm.rent_amount.$error.required"
                      class="error ng-hide c-red lh30">产品租用金额不能为空</span>
                <span role="alert"
                      ng-show="(contractBaseForm.$submitted || contractBaseForm.rent_amount.$touched) && contractBaseForm.rent_amount.$error.number"
                      class="error ng-hide c-red lh30">产品租用金额必须是数值类型</span>
                <span role="alert"
                      ng-show="(contractBaseForm.$submitted || contractBaseForm.rent_amount.$touched) && contractBaseForm.rent_amount.$error.min"
                      class="error ng-hide c-red lh30">产品租用金额必须大于等于0</span>
		        </div>
		        <span for="inputtext3" class="col-sm-3 control-label">交付金额</span>

		        <div class="col-sm-5">
			        <input type="number" number required min="0" name="delivery_amount"
			               ng-model="contractBaseInfo.delivery_amount" class="form-control align-r" id="inputtext3"
			               placeholder="交付金额">
                <span role="alert"
                      ng-show="(contractBaseForm.$submitted || contractBaseForm.delivery_amount.$touched) && contractBaseForm.delivery_amount.$error.required"
                      class="error ng-hide c-red lh30">交付金额不能为空</span>
                <span role="alert"
                      ng-show="(contractBaseForm.$submitted || contractBaseForm.delivery_amount.$touched) && contractBaseForm.delivery_amount.$error.number"
                      class="error ng-hide c-red lh30">交付金额必须是数值类型</span>
                <span role="alert"
                      ng-show="(contractBaseForm.$submitted || contractBaseForm.delivery_amount.$touched) && contractBaseForm.delivery_amount.$error.min"
                      class="error ng-hide c-red lh30">交付金额必须大于等于0</span>
		        </div>
	        </div>
        </div>

        <div class="form-group mt10" ng-if="contractBaseInfo.contractType == 1">
            <span for="inputtext3" id="erp_contract_code_span" class="col-sm-3 control-label" ng-if="contractBaseInfo.contract_property_id == '54f8a2b7-fce7-11e4-bed8-00155d02c832'">关联ERP合同编号</span>
            <div class="col-sm-5" id="erp_contract_code_div" ng-if="contractBaseInfo.contract_property_id == '54f8a2b7-fce7-11e4-bed8-00155d02c832'">
                <input type="text" name="erp_contract_code" required maxlength="50"
                       ng-model="contractBaseInfo.erp_contract_code" class="form-control align-r"
                       placeholder="关联ERP合同编号">
                <span role="alert"
                      ng-show="(contractBaseForm.$submitted || contractBaseForm.erp_contract_code.$touched) && (contractBaseForm.erp_contract_code.$error.required)"
                      class="error ng-hide c-red lh30">关联ERP合同编号不能为空</span>
            </div>

			<span for="inputtext3" id="erp_contract_link" class="col-sm-3 control-label" ng-if="contractBaseInfo.contract_property_id == '54f8a2b7-fce7-11e4-bed8-00155d02c832' || contractBaseInfo.contract_property_id == '593d3a12-006a-11e5-bed8-00155d02c832'">合同链接</span>
			<div class="col-sm-5" id="erp_contract_link_div" ng-if="contractBaseInfo.erp_contract_id !='' && (contractBaseInfo.contract_property_id == '54f8a2b7-fce7-11e4-bed8-00155d02c832' || contractBaseInfo.contract_property_id == '593d3a12-006a-11e5-bed8-00155d02c832')">
				<a class="form-control align-m" target="_blank" href="http://ekp.mingyuanyun.com/CWGL/HTGK/HTTZ/Contract_SignEdit.aspx?mode=3&oid={{contractBaseInfo.erp_contract_id}}">查看原合同</a>
			</div>

            <div class="col-sm-23 relative pb10 ml25 pull-right mr10">
                <div class="border-bottom-dashed pl10 relative"></div>
            </div>

        </div>
        <!-- 项目列表 -->
        <div ng-if="contractBaseInfo.contractTypeName == null || contractBaseInfo.contractType == 1" ng-include="'editinc/base-inc-projects.html'"></div>
		<div ng-if="contractBaseInfo.contractType == 5" ng-include="'editinc/base-inc-yunstore-list.html'"></div>

        <div class="form-group mt10">
            <span class="col-sm-3 control-label">备注</span>

            <div class="col-sm-20">
                <textarea name="contract_remark" id="" class="form-control" rows="3"
                          ng-model="contractBaseInfo.contract_remark" ng-maxlength="500"></textarea>
                <span role="alert"
                      ng-show="(contractBaseForm.$submitted || contractBaseForm.contract_remark.$touched) && contractBaseForm.contract_remark.$error.maxlength"
                      class="error ng-hide c-red lh30">备注信息不能超过500个字符</span>
            </div>
        </div>

        <div class="form-group mt35 clearfix clearboth"
             ng-if="contractBaseInfo.contract_status == 0 && contractBaseInfo.is_cancelled == 0 && contractBaseInfo.contractTypeName != null
             && !contractBaseInfo.readOnly">
            <div class="ml35 mt15">
                <button type="submit" ng-click="contractBaseForm.$valid && save()" class="btn btn-default">保存</button>
            </div>
        </div>
    </form>
</div>